<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="template.xhtml">
	<ui:define name="content">
	
		<p:panel header="Inserisci il codice">
			<h:form>
				<p>
					Un tuo amico ti ha dato il codice di un pacchetto viaggio da lui personalizzato?<br />Inseriscilo qui!
				</p>
				<h:panelGrid columns="2">
					<p:outputLabel value="Codice" />
					<p:inputText value="#{friendBean.code}" />	
					<p:button value="Indietro" outcome="home" />	
					<p:commandButton action="#{friendBean.validateCode}" value="Verifica codice" />			
				</h:panelGrid>
				<br />
				<p:messages showDetail="true" autoUpdate="true" closable="true" />	
			</h:form>
		</p:panel>
		
	</ui:define>
</ui:composition>

</html>